package com.gdsunfly.mongodb.pojo.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.io.Serializable;

/**
 * @author gdsunfly_wangquanqing
 * @date 2019/6/12 17:07
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Document(collection = "person")
public class Person implements Serializable {

    @Id
    @Field("id")
    private Long id;

    @Field("name")
    private String name;

    @Field("age")
    private Integer age;

}
